package com.web;

import com.pojo.dto.Message;
import com.pojo.entity.Focus;
import com.pojo.vo.FocusVo;
import com.service.FocusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class FocusController {
    @Autowired
    FocusService focusService;
    @PostMapping("/getStarts")
    public Message<List<FocusVo>>getStarts(){
       return focusService.getStarts();
    }
    @PostMapping("/getFans")
    public Message<List<FocusVo>>getFans(Long id){
        return focusService.getFansById(id);
    }
    @PostMapping("/getFocus")
    public Message<List<FocusVo>>getFocus(Long id){
        return focusService.getFocusById(id);
    }

    @PostMapping("/focusFriend")
    public Message<String>focusFriend(Focus focus){
        return focusService.focusFriend(focus);
    }

    @PostMapping("/deleteFocus")
    public Message<String>deleteFocus(Focus focus){
        return focusService.deleteFocus( focus);
    }

    @PostMapping("/getDiaoYou")
    public  Message<FocusVo>getDiaoYou(Long id,Long userId){
        return  focusService.getDiaoYou(id,userId);
    }
}
